<?php

namespace Houdunren\WeChat\Material;

use App\Models\WeChatMaterial;
use hisorange\BrowserDetect\Exceptions\Exception;
use Illuminate\Support\Facades\Http;
use Log;

trait Delete
{

    public function delete(string $media_id)
    {

        //token在基类中，功能列添加至扩展类，可以使用基类的方法
        $api = $this->api . '/material/del_material?access_token=' . $this->token();

        $response = Http::post($api, ['media_id' => $media_id])->throw()->json();

        $this->return($response);
    }


}
